
//
//  NoTouchView.m
//  Koina
//
//  Created by welldone on 14-9-29.
//  Copyright (c) 2014年 net.koina. All rights reserved.
//

#import "NoTouchView.h"



@implementation NoTouchView
@synthesize hotRects;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        hotRects = [[NSMutableArray alloc]init];
    }
    return self;
}




- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{

    Boolean isContent;
    for (NSValue *rect in hotRects) {
        
        isContent = CGRectContainsPoint(rect.CGRectValue, point);
        if (isContent) {
            return false;
        }
    }
    
    return true;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
